<!--{include header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="sysmsg-guide"><a href="/help/tour.php"><img src="/static/css/i/bg-newbie-guide.gif" /></a><a id="sysmsg-guide-close" href="javascript:void(0);" class="close">关闭</a></div>

<!--{if $team['close_time']}-->
<div id="sysmsg-tip" class="sysmsg-tip-deal-close"><div class="sysmsg-tip-top"></div><div class="sysmsg-tip-content"><div class="deal-close"><div class="focus">抱歉，您来晚了，<br />团购已经结束啦。</div><div id="tip-deal-subscribe-body" class="body"><form id="tip-deal-subscribe-form" method="post" action="/subscribe.php" class="validator"><table><tr><td>不想错过明天的团购？立刻订阅每日最新团购信息：&nbsp;</td><td><input type="text" name="email" class="f-text" value="" require="true" datatype="email" /></td><td>&nbsp;<input class="commit" type="submit" value="订阅" /></td></tr></table></form></div></div><span id="sysmsg-tip-close" class="sysmsg-tip-close">关闭</span></div><div class="sysmsg-tip-bottom"></div></div>
<!--{/if}-->

<!--{if $order}-->
<div id="sysmsg-tip" ><div class="sysmsg-tip-top"></div><div class="sysmsg-tip-content">您已经下过订单，但还没有付款。<a href="/order/check.php?id={$order['id']}">查看订单并付款</a><span id="sysmsg-tip-close" class="sysmsg-tip-close">关闭</span></div><div class="sysmsg-tip-bottom"></div></div><div id="deal-default"> 
<!--{/if}-->

	<div id="deal-default">
	<div id="sidebar">
		<!--{include block_side_invite}-->
		<!--{include block_side_bulletin}-->				
		<!--{include block_side_business}-->
		<!--{include block_side_subscribe}-->
	</div>									
	<!--{loop $others $one}-->		
	<div id="deal-share">		
		<div class="deal-share-top">
			<div class="deal-share-links">
				<h4>分享到：</h4>
				<ul class="cf"><li><a class="im" href="javascript:void(0);" id="deal-share-im">MSN/QQ</a></li><li><a class="kaixin" href="${share_kaixin($one)}" target="_blank">开心</a></li><li><a class="renren" href="${share_renren($one)}" target="_blank">人人</a></li><li><a class="douban" href="${share_douban($one)}" target="_blank">豆瓣</a></li><li><a class="sina" href="${share_sina($one)}" target="_blank">新浪微博</a></li><li><a class="email" href="${share_mail($one)}" id="deal-buy-mailto">邮件</a></li></ul>
			</div>
		</div>
		<div class="deal-share-fix"></div>
		<div id="deal-share-im-c">
			<div class="deal-share-im-b">
				<h3>复制下面的内容后通过 MSN 或 QQ 发送给好友：</h3>
				<p><input id="share-copy-text" type="text" value="{$INI['system']['wwwprefix']}/team.php?id={$one['id']}&r={$login_user_id}" size="30" class="f-input" tip="复制成功，请粘贴到你的MSN或QQ上推荐给您的好友"/> <input id="share-copy-button" type="button" value="复制" class="formbutton" /></p>
			</div>
		</div>
	</div>
	<div id="content">		
			<div id="deal-intro" class="cf">
				<div class="deal-share-num">${++$index}</div>
                <h1 style="margin-top:-100px;"><!--{if $one['close_time']==0}--><a class="deal-today-link" href="/team.php?id={$one['id']}">今日团购：<!--{/if}--><a href="/team.php?id={$one['id']}">{$one['title']}</a></h1>
                <div class="main">
                    <div class="deal-buy">
                        <div class="deal-price-tag"></div>
					<!--{if ($one['state']=='soldout')}-->
                        <p class="deal-price"><strong>{$currency}${moneyit($one['team_price'])}</strong><span class="deal-price-soldout"></span></p>
					<!--{elseif $one['close_time']}-->
                        <p class="deal-price"><strong>{$currency}${moneyit($one['team_price'])}</strong><span class="deal-price-expire"></span></p>
					<!--{else}-->
                        <p class="deal-price"><strong>{$currency}${moneyit($one['team_price'])}</strong><span><a ${$one['begin_time']<time()?'href="/team/buy.php?id='.$one['id'].'"':''}><img src="/static/css/i/button-deal-buy.gif" /></a></span></p>
					<!--{/if}-->
                    </div>
                    <table class="deal-discount">
                        <tr>
                            <th>原价</th>
                            <th>折扣</th>
                            <th>节省</th>
                        </tr>
                        <tr>
                            <td>{$currency}${moneyit($one['market_price'])}</td>
						<!--{if ($one['market_price']>0&&$one['team_price']>0)}-->
                            <td>${moneyit($one['discount_rate'])}折</td>
						<!--{else}-->
							<td>?</td>
						<!--{/if}-->
                            <td>{$currency}{$one['discount_price']}</td>
                        </tr>
                    </table>
					<!--{if $one['close_time']}-->
                    <div class="deal-box deal-timeleft deal-off" id="deal-timeleft" curtime{$index}="{$now}000" diff{$index}="{$diff_time}000">
						<h3>本团购结束于</h3>
						<div class="limitdate"><p class="deal-buy-ended">${date('Y-m-d', $one['close_time'])}<br>${date('H:i:s', $one['close_time'])}</p></div>
					</div>
					<!--{else}-->
                    <div class="deal-box deal-timeleft deal-on" id="deal-timeleft" curtime{$index}="{$now}000" diff{$index}="{$diff_time}000">
						<h3>剩余时间</h3>
						<div class="limitdate"><ul id="counter{$index}">
						<!--{if $left_day>0}-->
							<li><span>{$one['left_day']}</span>天</li><li><span>{$one['left_hour']}</span>小时</li><li><span>{$one['left_minute']}</span>分钟</li>
						<!--{else}-->
							<li><span>{$one['left_hour']}</span>小时</li><li><span>{$one['left_minute']}</span>分钟</li><li><span>{$one['left_time']}</span>秒</li>
						<!--{/if}-->
						</ul></div>
					</div>
					<!--{/if}-->

				<!--{if $one['close_time']==0}-->
					<!--{if $one['state']=='none'}-->
					<div class="deal-box deal-status" id="deal-status">
						<p class="deal-buy-tip-top"><strong>{$one['now_number']}</strong> 人已购买</p>
						<div class="progress-pointer" style="padding-left:{$bar_size-$bar_offset}px;"><span></span></div>
						<div class="progress-bar"><div class="progress-left" style="width:{$bar_size-$bar_offset}px;"></div><div class="progress-right "></div></div>
						<div class="cf"><div class="min">0</div><div class="max">{$one['min_number']}</div></div>
						<p class="deal-buy-tip-btm">还差 <strong>{$one['min_number']-$one['now_number']}</strong> 人到达最低团购人数</p>
					</div>
					<!--{else}-->
					<div class="deal-box deal-status deal-status-open" id="deal-status">
						<p class="deal-buy-tip-top"><strong>{$one['now_number']}</strong> 人已购买</p>
						<p class="deal-buy-on" style="line-height:200%;"><img src="/static/css/i/deal-buy-succ.gif"/> 团购成功！ <!--{if $one['max_number']>$one['now_number']||$one['max_number']==0}--><br/>还可以继续购买<!--{/if}--></p>
					</div>
					<!--{/if}-->
				<!--{else}-->
					<div class="deal-box deal-status deal-status-{$one['state']}" id="deal-status"><div class="deal-buy-{$one['state']}"></div><p class="deal-buy-tip-total">共有 <strong>{$one['now_number']}</strong> 人购买</p></div> 
				<!--{/if}-->
				</div>
                <div class="side">
                    <div class="deal-buy-cover-img" id="team_images">					
						<a href="/team.php?id={$one['id']}"><img src="${team_image($one['image'])}"/></a>					
					</div>
                    <div class="digest"><br />${nl2br(strip_tags($one['summary']))}</div>
                </div>
            </div>            
    </div>		
	<!--{/loop}-->	

</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include footer}-->
